package com.perfma.xtest.cmd;

/**
 * 任务类型
 *
 * @auther echo
 * @create 2018-04-28 11:17
 */
public enum JobType {

    KILLJOB("终止任务"),
    STARTJOB("开始任务");

    private String desc;

    JobType(String desc) {
        this.desc = desc;
    }

    public String getDesc() {
        return desc;
    }

    public static JobType nameOf(String desc) {
        for (JobType v : JobType.values()) {
            if (v.desc.equals(desc)) {
                return v;
            }
        }

        return null;
    }

    @Override
    public String toString() {
        return desc;
    }
}
